package com.extension.company.view.adapter;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

import com.extension.company.admin.R;
import com.extension.company.admin.wxapi.GeneralizeShareActivity;

/**
 * Location界面的適配器
 */
public class LocationAdapter extends BaseAdapter implements View.OnClickListener {

	private Context context;

	public LocationAdapter(Context context) {
		this.context = context;
	}

	@Override
	public int getCount() {
		return 10;
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder viewHolder;
		if (convertView == null) {
			viewHolder = new ViewHolder();
			convertView = LayoutInflater.from(context).inflate(R.layout.fragment_location_city_list_item, null);
//			viewHolder.shareImg = convertView.findViewById(R.id.fraghome_share);
			convertView.setTag(viewHolder);
		} else {
			viewHolder = (ViewHolder) convertView.getTag();
		}
//		viewHolder.shareImg.setOnClickListener(this);


		return convertView;
	}

	static class ViewHolder {
//		ImageView shareImg;
	}

	@Override
	public void onClick(View v) {
		GeneralizeShareActivity.Internet((Activity) context);
	}

}
